package day4.p2;

import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.ObjectInputStream;

public class StudentDatabase2 {
	public static void main(String[] args) throws IOException,
			ClassNotFoundException {
		ObjectInputStream ois = null;
		try {
			ois = new ObjectInputStream(new FileInputStream("e:\\Student1.dat"));
			int count = ois.readInt();
			for (int i = 0; i < count; i++)
				ois.readObject();
		} catch (FileNotFoundException e) {
		} finally {
			ois.close();
		}
	}
}